vcAnnotation

vcAnnotation is a layout item used for authoring new and existing annotations in a layout.

See in: Overview

Module: vcCore

Parent: vcLayoutItem

Children -

Referenced by: -

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
HeightRealRWDefines the height of text displayed in annotation.
LineWidthRealRWDefines the line width of annotation.
LocationvcMatrixRWDefines the position matrix of annotation in World coordinate system.
LockToNodeBooleanRWDefines if the annotation is attached to a node in component. That is, whether or not the annotation is anchored to a component or 3D world.
MaterialvcMaterialRWDefines the material of annotation.
NodevcNodeRWDefines the node the annotation is attached to in the 3D world. If the annotation is not locked to a node, the value is None.
PositionvcMatrixRWDefines the location of the annotation in its parent's coordinate system.
See more
That is, the anchor point of the annotation. If the annotation is not anchored to a component, the location is based in the World(simulation root node) coordinate system.
TextStringRWDefines the text of the annotation displayed in an environment.

Example: Create Annotation

"""Create annotation"""
import vcCore as vc

app = vc.getApplication()
world = vc.getWorld()
annotation = world.findLayoutItem('MyAnnotation')
if not annotation:
  annotation = world.createLayoutItem(vc.vcLayoutItemType.ANNOTATION)
  annotation.Name = 'MyAnnotation'
matrix = vc.vcMatrix.new()
matrix.P = vc.vcVector.new(500.0, 500.0, 500.0)
annotation.Location = matrix
matrix.P = vc.vcVector.new(0.0, 0.0, 0.0)
annotation.Position = matrix
annotation.Material = app.findMaterial('black')
annotation.Text = 'My Annotation'
annotation.Properties['OutlineStyle'].Value = 0
app.render()